package com.building18.pojo.enums;

import lombok.Getter;

@Getter
public enum Code {
    INSERT_SUCCESS(200,"添加成功"),
    INSERT_FAIL(500,"添加失败"),

    DELETE_SUCCESS(200,"删除成功"),
    DELETE_FAIL(500,"删除失败"),

    SELECT_SUCCESS(200,"查询成功"),
    SELECT_ISNULL(200,"数据为空"),
    SELECT_FAIL(500,"查询失败"),

    UPDATE_SUCCESS(200,"修改成功"),
    UPDATE_FAIL(500,"修改失败"),

    LOGIN_SUCCESS(200,"登录成功"),
    LOGIN_FAIL(500,"登录失败"),

    LOGOUT(200,"注销成功"),

    USERNAME_OR_PASSWORD_ERROR(500,"用户名或密码错误!"),
    WRONG_OLD_PASSWORD(500, "旧密码输入错误"),
    PASSWORD_NOT_SAME(500, "两次密码输入不一致"),

    LOGIN_COOKIE_FAIL(401,"用户未登录"),
    CAN_DELETE(200, "无关联数据，允许删除");


    private final Integer code;
    private final String message;

    Code(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
